package com.initialize.pub.dao;

import com.initialize.pub.mybatis.plus.entity.Site;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * Created with IntelliJ IDEA.
 * User: jane
 * Date: 2020/3/15
 * Time: 6:10 下午
 * Description:
 */
@Repository
public interface SiteDAO {

    @Select(
            "SELECT * FROM site WHERE (`key` = #{key})"
    )
    Site selKey(@Param("key") String key);

    @Update({
            "UPDATE site SET `value` = #{value}   WHERE `key` = #{key}"
    })
    int update(@Param("key") String key,@Param("value") String value);
}